<?php
/**
 * Created by PhpStorm.
 * User: Echa
 * Date: 2016/9/7
 * Time: 14:01
 */
namespace YMApi\Model;
use Think\Model;
use Think\Template\Driver\Mobile;

class  GoodsstoragerecordModel extends Model
{
    protected $tableName = 'goods_storage_record';
    
    /*
     * 商品出入库记录
     * */
    public function add_storage_record($data){
        $goodsrecord=array(
            'goods_storage_id'=>$data['goods_storage_id'],
            'wpid'=>0,
            'wid'=>$data['wid'],
            'goods_id'=>$data['goods_id'],
            'goods_sn'=>$data['goods_sn'],
            'operation_num'=>$data['operation_num'],
            'real_num'=>$data['real_num'],
            'frozen_num'=>$data['frozen_num'],
            'defective_num'=>$data['defective_num'],
            'operation_userid'=>$data['operation_userid'],
            'average_userid'=>$data['average_userid'],
            'operation_addtime'=>$data['operation_addtime'],
            'source_no'=>$data['source_no'],
            'record_type'=>$data['record_type'],
            'remark'=>$data['remark'],
        );
        $id=$this->add($goodsrecord);
        if($id){
            return $id;
        }else{
            return false;
        }
    }
    

}